<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3//EN">
<HTML><HEAD>
<TITLE>User's Guide - Visual Programming: The Basics</TITLE>

<META HTTP-EQUIV="abstract" CONTENT="IBM Visualization Data Explorer User&#39;s
Guide">
<META HTTP-EQUIV="contact" CONTENT="IBM Visualization Data Explorer
(ibmdx@watson.ibm.com)">
<META HTTP-EQUIV="owner" CONTENT="IBM Visualization Data Explorer
(ibmdx@watson.ibm.com)">
<META HTTP-EQUIV="updated" CONTENT="Tue, 16 Sep 1997 ">
<META HTTP-EQUIV="review" CONTENT="Fri, 14 Aug 1998 ">

<META HTTP-EQUIV="keywords" CONTENT="GRAPHICS VISUALIZATION VISUAL PROGRAM DATA
MINING">
<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
</HEAD><BODY BGCOLOR="#FFFFFF" link="#00004b" vlink="#4b004b">
		<TABLE width=510 border=0 cellpadding=0 cellspacing=0>
			<TR>
				<TD><IMG SRC="../images/spacer.gif" WIDTH=80 HEIGHT=1></TD>
				<TD><IMG SRC="../images/spacer.gif" WIDTH=49 HEIGHT=1></TD>
				<TD><IMG SRC="../images/spacer.gif" WIDTH=24 HEIGHT=1></TD>
				<TD><IMG SRC="../images/spacer.gif" WIDTH=100 HEIGHT=1></TD>
				<TD><IMG SRC="../images/spacer.gif" WIDTH=3 HEIGHT=1></TD>
				<TD><IMG SRC="../images/spacer.gif" WIDTH=127 HEIGHT=1></TD>
				<TD><IMG SRC="../images/spacer.gif" WIDTH=6 HEIGHT=1></TD>
				<TD><IMG SRC="../images/spacer.gif" WIDTH=50 HEIGHT=1></TD>
				<TD><IMG SRC="../images/spacer.gif" WIDTH=71 HEIGHT=1></TD>
			</TR>
			<TR>
				<TD colspan=9><IMG src="../images/flcgh_01.gif" width=510 height=24 border="0" alt="OpenDX - Documentation"></TD>
			</TR>
			<TR>
				<TD colspan=2><A href="../allguide.htm"><IMG src="../images/flcgh_02.gif" width=129 height=25 border="0" alt="Full Contents"></A></TD>
				<TD colspan=3><A href="../qikguide.htm"><IMG src="../images/flcgh_03.gif" width=127 height=25 border="0" alt="QuickStart Guide"></A></TD>
				<TD><A href="../usrguide.htm"><B><IMG src="../images/flcgh_04d.gif" width=127 height=25 border="0" alt="User's Guide"></B></A></TD>
				<TD colspan=3><A href="../refguide.htm"><IMG src="../images/flcgh_05.gif" width=127 height=25 border="0" alt="User's Reference"></A></TD>
			</TR>
			<TR>
				<TD><A href="usrgu022.htm"><IMG src="../images/flcgh_06.gif" width=80 height=17 border="0" alt="Previous Page"></A></TD>
				<TD colspan=2><A href="usrgu024.htm"><IMG src="../images/flcgh_07.gif" width=73 height=17 border="0" alt="Next Page"></A></TD>
				<TD><A href="../usrguide.htm"><IMG src="../images/flcgh_08.gif" width=100 height=17 border="0" alt="Table of Contents"></A></TD>
				<TD colspan=3><A href="usrgu022.htm"><IMG src="../images/flcgh_09.gif" width=136 height=17 border="0" alt="Partial Table of Contents"></A></TD>
				<TD><A href="usrgu080.htm"><IMG src="../images/flcgh_10.gif" width=50 height=17 border="0" alt="Index"></A></TD>
				<TD><A href="../srchindx.htm"><IMG SRC="../images/flcgh_11.gif" width=71 height=17 border="0" alt="Search"></A></TD>
			</TR>
		</TABLE>
		<H2><A NAME="Header_48" ></A>2.2 Visual Programming: The Basics</H2>
		<A NAME="IDX482"></A><A NAME="IDX483"></A>
<P>
The Field description represents a mapping between your actual data
sampling space and the Data Explorer graphics system used to make images
of that data space.
Given such a mapping, the next step is to learn how to visualize your
data in meaningful ways.
Data Explorer provides both a visual programming language and a text-based
scripting language.
The scripting language is described in <A HREF="usrgu050.htm#HDRUSL">Chapter 10.
"Data Explorer Scripting Language"</A>.
The visual programming language uses a graphically oriented editor
instead of a traditional text-based editor as in C or Pascal.
You will be using this graphical programming environment to generate
graphic images as output;
this distinction between graphics as program and graphics as output is
subtle, but we do not want to confuse the two.
<P>
To build a visual program, you physically select, place, and connect
functional <I>modules</I>; these are represented graphically
as labeled rectangular boxes with tabs sticking out
of them.
Each module can be thought of as a subroutine in a text-based
programming system.
You can place multiple instances of the same module, analogous to
calling a subroutine several times in a program.
Modules have inputs and outputs (those little tabs sticking out) just
like the arguments and return values in a text language.
The inputs and outputs of modules are connected together into a
<I>network</I>, which in some ways resembles a flow-chart diagram.
(Unlike a flow-chart, you cannot loop back a wire to an earlier
input in a Data Explorer visual program)
Note that many modules have "hidden" tabs for less commonly used
parameters.
You can expose hidden parameters by using the <TT><STRONG>Expand</STRONG></TT>
button
in the module&#39;s Configuration dialog box.
<P>
Generally speaking, you use Data Explorer to visualize your data in the
following way.
First, bring in the data from a disk file as a Field (the Import module
can read in a Data Explorer format file, a General Array Importer file,
or netCDF, CDF, or HDF files).
Next, run the imported data Field through one or more modules found in
the Realization category.
Each of these produces a visual object.
You may also want to process these Realizations through Transformation
modules to modify the visual or other characteristics of an object.
Either one or a collection of visual objects is then displayed in an
Image window.
The Image window provides a number of convenient tools for interactively
rotating your visual objects, zooming in for a closer look at them,
and so on.
There are many different variations of the above scheme: for example,
modules like Construct allow you to create simple Fields without
having to import data;
Structuring category modules permit you to modify Field components in
many ways;
other types of output are provided so you can write image files to disk,
and so on.
But the concept of Import-Realize-Transform-Image is the basic and most
common approach to using Data Explorer.
<P>
So what happens inside a visual program?
The Field with its components flows through one module after
another.
Some modules add new components, others remove or change
components.
However, an essential point to keep in mind is that unless a module is
designed to operate on a specific component, it does not affect any
other part of a Field.
That is to say, if you  feed a Field into a module that does not operate
on the "positions" component, then from the output of that module
will come a Field with the identical (unchanged) positions component.
And that means that another module further "downstream" in the
visual program
can operate on that "positions" component if need be.
This differs in a critical way from traditional languages, which
explicitly specify all return values from a function.
In Data Explorer, assume that everything that goes into a module comes out
(though often changed), whereas in a traditional language,
ignoring side-effects (bad programming practice, usually), only those
values specifically indicated as return values are returned
when the function exits.
The descriptions in <I>IBM Visualization Data Explorer User&#39;s Reference</I>
identify the components that are changed,
deleted, or added by each module.
<P>
It is also very often useful to "branch" a visual program.
Any module input can only have one wire ("tab connection") attached
to it at a time.
However, any module output can feed several different module
inputs.
This allows you to run copies of the same Field through different
"subnets" to perform several different operations
on it.
To see all of these visual outputs in the same scene, you use the
Collect module to gather all the "subnet" output wires
back together.
The single output from Collect (called a <I>Group</I>) can be
attached to the input of the Image module.
The Collect module shares a handy feature with some other modules in
that you can easily add new inputs to it if you need more than
the two default input tabs.
<P>
See <A HREF="usrgu062.htm#HDRAPPVIZ">Appendix A. "Using Data Explorer: Some
Useful Hints"</A> for discussions of the following:
<UL COMPACT>
<LI>Visualization techniques (including animation, color mapping, and
shading).
<LI>Creating good visualization programs for interactive use.
<LI>Creating good visualizations for video.
</UL>
		<P>
		<HR>
		<DIV align="center">
			<P><A href="../allguide.htm"><IMG src="../images/foot-fc.gif" width="94" height="18" border="0" alt="Full Contents"></A> <A href="../qikguide.htm"><IMG src="../images/foot-qs.gif" width="94" height="18" border="0" alt="QuickStart Guide"></A> <A href="../usrguide.htm"><IMG src="../images/foot-ug.gif" width="94" height="18" border="0" alt="User's Guide"></A> <A href="../refguide.htm"><IMG src="../images/foot-ur.gif" width="94" height="18" border="0" alt="User's Reference"></A></P>
		</DIV>
		<DIV align="center">
			<P><FONT size="-1">[ <A href="http://www.research.ibm.com/dx">OpenDX Home at IBM</A>&nbsp;|&nbsp;<A href="http://www.opendx.org/">OpenDX.org</A>&nbsp;] </FONT></P>
		</DIV>
		<P></P>
	</BODY></HTML>
